package org.rana.example.annotation.mapper;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.rana.example.annotation.entity.User;

/**
 * Class description:
 *
 * @author zhw
 * @version 1.0 16/9/26 上午9:15
 */
@Mapper
public interface UserMapper {


    @Insert("INSERT INTO user (username,email) VALUES (#{username},#{email})")
    int insert(User user);

    @Select("SELECT * FROM user WHERE id = #{id}")
    User selectById(int id);

}
